﻿#ifndef SAVETERMINALTOMODELDLG_H
#define SAVETERMINALTOMODELDLG_H

#include <QDialog>
#include "db_cfg_g_def.h"
#include "DbCfgFun.h"

#define		TEST_TRANSACTION

namespace Ui {
    class SaveTerminalToModelDlg;
}

class SaveTerminalToModelDlg : public QDialog {
    Q_OBJECT
public:
    SaveTerminalToModelDlg(QWidget *parent = 0);
    ~SaveTerminalToModelDlg();

	void InsertDevModel(QString ModeName);
	int InsertYxModel(unsigned int DevModelId);
	int InsertYcModel(unsigned int DevModelId);
	int InsertYkModel(unsigned int DevModelId);
	int InsertYmModel(unsigned int DevModelId);
	int InsertBhYcModel(unsigned int DevModelId);
	int InsertSetModel(unsigned int DevModelId);
	int InsertParamModel(unsigned int DevModelId);
	int InsertPrecModel(unsigned int DevModelId);
	int InsertRybModel(unsigned int DevModelId);
	int InsertSetAreaModel(unsigned int DevModelId);
//	int InsertRlySOEModel(unsigned int DevModelId);
	void	ReleasColumnInfo();

protected:
    void changeEvent(QEvent *e);

protected slots:
	void AffirmBtn();

signals:
	void	UpDateTreeItem_Signal(quint32 RecordId);

private:
	Ui::SaveTerminalToModelDlg *ui;

	QString		m_DevName;
	int		m_YxNum;
	int		m_YcNum;
	int		m_YkNum;
	int		m_YmNum;
	int		m_SetNum;
	
	int		 m_columnNum;
	int		 m_RecordLength;
	cColumn_Info *m_pColumnInfo;
	int		 *m_pDataOffset;
	
	
};

#endif // SAVEDEVTOMODELDLG_H
